1. Field of the Invention
The present invention relates to a data processing apparatus such as a workstation or a wordprocessor having functions of performing image operations (editing) such as movement, enlargement/reduction, rotation, and deforming of an image read by a scanner.
2. Description of the Related Art
Workstations and wordprocessors having image edit functions have been developed. A wordprocessor having image edit functions can insert an edited image in a created document. An example of a display screen prior to image editing in this wordprocessor is shown in FIG. 1. In this example, a plurality of virtual screens, called windows, are displayed on a screen of a display unit, thereby performing a multiwindow display. In the following description, an image before conversion is displayed in the first window, and a document is displayed in the second window. The image in the first window is partially converted, and the converted image is inserted in the document in the second window. An image before conversion is displayed in an image window 1, and a document in which an image is to be inserted is displayed in a document window 3. A cursor 5 indicates an arbitrary point in an image. The cursor 5 can move over a boundary between the image window 1 and the document window 3 so that it can be moved to an arbitrary point on the entire image. Menus 7 include various processing items such as image editing and retrieval. In this example, the image window 1 and the document window 3 have areas for displaying the menus 7, respectively.
The cursor 5 in the display screen is moved by designation from a pointing device such as a mouse or tablet. In addition, the cursor 5 is moved to start various types of processing upon operation of a switch arranged on the pointing device. Main operation methods of the pointing device and the switch are the following three methods:
(i) A cursor 5 is moved to a given point in a display screen by the pointing device, and the switch is turned on and then immediately turned off. This operation is called "picking" a point. PA1 (ii) A point corresponding to any one of items of the menus 7 within the frame is picked to start processing displayed within the frame. Picking of each processing is called selection of the processing. The menus 7 are kept displayed in the windows 1 and 3. There are many items on menus 7 which are not directly associated with image editing, such as "cancel". This "cancel" item can be used any time in a step which waits for a switching operation. When the "cancel" item is selected, immediately preceding processing is canceled. PA1 (iii) The cursor 5 is moved to a given point and the switch is turned on. The cursor 5 is moved while the switch is kept ON. When the switch is turned off, certain processing is performed for the turn-on position and the turn-off position. The switch (e.g., a mouse button) of the pointing device is depressed at the given point, the mouse is moved with the switch being kept ON, and the button is then released at a new position. These operations are called dragging. In particular, when dragging is started at a specific point such as a vertex of a rectangular frame (to be described later) set within the window 1 at the time of image editing, and this position is moved to a destination at which dragging is completed (i.e., the switch is turned off), these operations are called "dragging" a point. PA1 (i) A user designates the "image edit" processing and an item representing each processing content such as "enlargement/reduction" to select desired processing to be executed. For this reason, at the image edit apparatus, the user must memorize an item name corresponding to desired processing in the menu. If the user does not know its item name, each item name displayed in the menus 7 must be selected, and this item must be executed to check the processing content. When an image edit apparatus becomes multifunctional, the number of items in the menu is increased. It thus becomes more difficult for the user to properly select a desired function (processing). For this reason, the conventional image edit apparatus is not necessarily convenient. PA1 (ii) In the conventional image edit apparatus, every time image editing is performed, an item in a menu and first and second frames must be designated. When image editing is repeated in a trial and error, selection of the menu must be repeated, resulting in cumbersome operations. When image editing is repeated as described above, two frames must be designated each time although the user often wishes to only slightly deform the set frames. In addition, in this case, since the position and size of the frame set in the previous editing are not known, much time is required to insert a desired image in a desired document.
A method of performing conventional image conversion in a wordprocessor having an image edit function will be described below. Referring to FIG. 1, when an "image edit" function in the menus 7 in the document window 3 is selected, the image edit (conversion) function is evoked. When the "image edit" function is evoked, a menu (pull-down menu) representing items as a detailed processing content in "image edit" processing is displayed, as shown in FIG. 2. Enlargement/reduction, rotation, move, and deforming, i.e., new items of the processing contents in the "image edit" processing are displayed. These new items are used to select a type (processing content) of image conversion. When an item in the displayed pull-down menu is selected, one of the enlargement/reduction processing, rotation processing, move processing, and deforming processing is executed. For example, assume that the enlargement/reduction item is selected.
In the state shown in FIG. 2, when the "enlargement/reduction" item is selected, enlargement/reduction processing is executed. First, the displayed pull-down menu is deleted, and the state shown in FIG. 1 is restored. The position and size of a rectangular frame (to be referred to as a first frame hereinafter) for specifying an image as an editing target in the image window 1 are designated by move operations (i.e., dragging) of the cursor 5. An example of the display screen upon designation of the first frame is shown in FIG. 3. A rectangular frame (to be referred to as a second frame hereinafter) for designating a document window 3 area in which an image is to be inserted is similarly set. An example of the display screen in which the second frame is set is shown in FIG. 4. When the first and second frames are set, enlargement/reduction processing is performed at independent magnifications in the horizontal and vertical directions so that the image in the first frame can be fitted in the second frame. The enlarged/reduced image is displayed in the second frame. When the enlarged/reduced image is displayed in the second frame, the first and second frames are deleted, thereby completing the enlargement/reduction processing. An example of the display screen upon completion of the enlargement/reduction processing is shown in FIG. 5.
Rotation processing and move processing can be performed as in enlargement/reduction processing such that the pull-down menu is displayed upon selection of the "image edit" in the menus 7 and "rotation" or "move" is selected from this pull-down menu. In particular, when rotation processing is started, a rotation amount for the image within the first frame must be designated. The rotation amount is designated in units of 90.degree. (i.e., 90.degree., 180.degree., 270.degree.) and is selected from a menu representing rotation amounts. When selected processing (e.g., enlargement/reduction processing and rotation processing) is completed, the image edit function is completed.
As described above, in the conventional image edit function, when one processing operation (image conversion) is performed, image edit processing is completed. For this reason, when each processing is repeated in a trial and error way to insert a desired image in a document, the "image edit" item and an item representing its processing content must be selected to set the first and second frames.
The above conventional image edit function has the following problems.
When image conversion functions are realized as programs in a general-purpose processor, conditional branch instructions and multiplication and division calculations are generally included in an innermost program loop which has the highest operation frequency. For this reason, pipeline errors occur even if pipeline processing is performed, and the operation speed cannot be increased.